let oImg = document.querySelector("img");
let p = new Play(oImg);
p.click();

document.body.onkeydown = function (event) {
  let key = event.key.toUpperCase();
  let oDiv = document.querySelector("." + key);
  // 1.根据div找到这个div对应的鬼魂对象在数组中的位置
  let currentIndex = list.findIndex(function (currentValue) {
    return currentValue.oDiv === oDiv;
  });
  if (currentIndex === -1) return;
  // 2.根据位置取出对应的鬼魂对象
  let currentSpecter = list[currentIndex];
  // 3.将鬼魂对应的div从body中删除
  currentSpecter.bomb();
  list.splice(currentIndex, 1);
}